#!/usr/bin/env bash

## 设定 阿里dns
echo "nameserver 223.5.5.5"    >   /etc/resolv.conf
echo "nameserver 223.6.6.6"    >>  /etc/resolv.conf

apt-get   update   && \
apt-get install -y vim-nox pylint git \
	exuberant-ctags build-essential cmake python-dev 
	libclang1  cmake  \
	python3-dev \
	golang   && \
mkdir -p ~/.vim/bundle  && \
git clone --depth 1 https://github.com/scrooloose/nerdtree.git      ~/.vim/bundle/nerdtree  && \
git clone --depth 1 https://github.com/fholgado/minibufexpl.vim.git ~/.vim/bundle/minibufexpl && \
git clone --depth 1 https://github.com/majutsushi/tagbar.git   ~/.vim/bundle/tagbar  && \
git clone --depth 1 https://github.com/tpope/vim-sensible.git   ~/.vim/bundle/sensible  && \
git clone --depth 1 https://github.com/scrooloose/syntastic.git   ~/.vim/bundle/syntastic  && \
git clone --depth 1 https://github.com/sheerun/vim-polyglot.git   ~/.vim/bundle/polyglot  && \
git clone --depth 1 https://github.com/Valloric/YouCompleteMe.git   ~/.vim/bundle/YouCompleteMe  && \
git clone --depth 1 https://github.com/SirVer/ultisnips.git   ~/.vim/bundle/ultisnips  && \
git clone --depth 1 https://github.com/honza/vim-snippets.git   ~/.vim/bundle/vimsnippets  && \
 \
cd /usr/lib/llvm-3.*/lib/ && \
sudo ln -s libclang.so.1 libclang.so  && \
cd ~/.vim/bundle/YouCompleteMe  && \
git submodule update --init --recursive  && \
./install.sh --clang-completer --system-libclang  

